<!--
 描述: 教学院长学期报告
 作者: Hanyue
 日期: 2020-06-20
-->

<template>
  <div class="home-container">
  	<div class="wrap" :style="{height:fullHeight+'px'}">
      <div class="top"></div>
      <div class="tab">
        <a v-for="(item,index) in bylist" :key="index"  href="#" :class="curTab == index ? 'active':''" @click="change(index)"><span>{{item.name}}</span></a>
      </div>
      <el-row :gutter="20" ref="editor" >
        <el-col :span="8" :style="{height:(fullHeight - 170)+'px'}">
          <jxyxPart />
        </el-col>
        <el-col :span="8" :style="{height:(fullHeight - 170)+'px'}">
          <xuejiPart />
        </el-col>
        <el-col :span="8">
          <el-row :gutter="20">
            <el-col :span="24" :style="{height:(fullHeight - 190)/2 +'px'}" style="margin-bottom:20px;">
              <kscjPart />
            </el-col>
            <el-col :span="24" :style="{height:(fullHeight - 190)/2 +'px'}">
              <byxwPart />
            </el-col>
          </el-row>
        </el-col>
      </el-row>
  

    </div>
    
  </div>
</template>

<script>
import { screenSize } from '@/assets/js/utils'
import  computeHeight  from '@/components/computeHeight'

export default {
  name: 'Home',
  components: {},
  data() {
  	return {
  		bylist:[
        {id:0, name:'本科生'},
        {id:1, name:'研究生'},
      ],
      curTab:0,
      fullHeight:0
  	}
  },
  computed: {
  	
  },
  created() {
  },
  mounted() {
    // screenSize(this.$refs.editor);
    this.curTab = 0;
    this.fullHeight = computeHeight.screenHeight;
    console.log(computeHeight);
  },
  methods: {
    change(index){
      this.curTab = index;
    },
  
  }
}
</script>

<style lang="scss" scoped>
.tab{
  text-align: left;
  padding-left:80px;
  margin-bottom:16px;
  a{
    display: inline-block;
    width: 160px;
    height: 46px;
    line-height: 46px;;
    position: relative;
    text-align: center;
    margin-right:18px;
    font-size:16px;
    color:#fff;
    z-index: 1;
    span{
      position: relative;
      z-index: 2;
    }
    &::after, &.active::after{
      content:'';
      position: absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      border:1px solid #474990;
      transform: skewX(-30deg);
      z-index: 0;
    }
    &:hover{
      &::after{
      background:none;
      border:1px solid #676ab9;
      }
    }
    &.active{
      &::after{
      background:linear-gradient(to right, #456499 ,#71b2e6)
      }
    }
   
  }
}

.home-container {
	position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  .wrap {
    transform-origin: 0px 0px 0px;
    background: url(../assets/img/jxbg_bg.jpg) no-repeat;
    background-size: cover;
    background-position: 50% 0;
    background-color: rgb(0, 0, 0);
    min-width: auto;
    width: 100%;
    min-height: auto;
    overflow: auto;
    .el-row{
      margin:0!important;
    }
    .el-col .el-row{
      margin:0 -10px !important;
    }
    .top {
      // position: absolute;
      // left: 0; 
      // top: 0; 
      width: 100%; 
      height: 88px; 
      background-color: transparent; 
      background: url(../assets/img/jxbg_title.png) no-repeat center; 
      border: none; 
      overflow: hidden;
    }
    .divider {
      position: absolute;
      left: 50px;
      top: 3253px;
      width: 90%;
      height: 50px;
      width: 300px;
      border: none;
      background: transparent;
    }

  }
}	
</style>
